Cleaning and refactoring.