cleanup, incl some javadocs