Cleaning code and removing unused imports.