switch to maven.

add some simple unit tests to start out with.

Rename several classes to use more natural java names.
refactor some of the duplicated code into it's own class