Removed some unneeded method
Removed unneeded error checking
Added javadoc for constructor
Added numerous comments and divided the algorithm into smaller methods