Code refactoring and cleaning.