Have Written Javadoc and cleaned out some unnecessary code. Also
generated javadoc.