Reformat code and remove unused imports.