General tidy up - rearranged various classes, tidied up some imports.