Remove unused code and other minor changes.
Remove unused imports