Added additional unit tests and additional javadoc.