General tidy up of the code

removed unused imports and added supress warnings