Added Javadoc documentation to complement source code.