Removing more dead code and fixing some javadoc