Removing unused imports plus minor clean up.