Refactored to generate a javadoc