Security manager refactoring.