Added javadoc for what I did, and cleaned up the code with the formatter.