Removed unused imports, cleaned up some code.