remove unused imports and some code formatting