Applying security best practices