Add javadoc and remove unused imports