Fourth round of Javadoc writing + refactoring