Update JavaDoc and write testing code.
Resolve conflicts.