Remove unused imports and fix some cosmetics