Fixed various warnings.
Removed redundant imports.