Cleanup and unit tests.

Corrected package of tests (convention has them in the same package as the classes they test - this also allows them to access package-private members).
Fixed error in addX() and addY() methods.
Javadoc.
Unit tests.