Fixed more formating and removed some unused imports.
Fixed some warnings.