remove unused imports and cleanup