maven build

I made this branch to build using Maven. Feel free to merge into master as appropriate.