securing and refactoring lessons