Corrects formatting and adds necessary javadoc