Added Javadoc comments to all the codes