Removed unused imports, tidied up whitespace.