remove a few unused things and add javadoc