Updated formatting, refactored some method names, and updated javadocs.