3.1 - Now with Javadoc

This update is a commented version of the code with some cleaning up so
it looks nicer.