Added some javadoc comments, basic cleanup