Security and refactoring