Added documentation and tested javadoc.