Third round of Javadoc writing + refactoring