Started javadoc
More javadoc, reorganized some code