Removes obsolete imports
Does some cleanup