Added javadoc esque descriptions in front of each method to make the
code easier to understand.