tidied up imports and made alphabetical
added some javadoc comments