Added additional javadoc comments and comments where appropriate.