Minor refactoring/Javadoc