cleaning and refactoring.