Removed unused imports and a bunch of dead code