Extracting objects to their own file. Fixing and removing unused imports.