Update imports, update javadoc and fix warnings