Add additional tests. Begin to write Java doc