fixed unused imports and added some javadoc