Added Javadoc and Modified MAin a little