Tidy up classes and remove some unused imports