Some cleanup of unused imports and unused code