Removed some unused imports and dead code to reduce warnings