Added some basic Javadocs and comments to key methods of the program.