tests and makefile

I've written a makefile with *clean* and *test* tasks, which should help formalize all the testing setup steps. It'll be handy if you decide to set up travis.

I've also cleaned up some of the unit tests. In particular, I split up some tests that had multiple assertions into separate tests, which will give better regression reports. All unit tests are passing, so it's safe to put `make test` in a pre-commit hook if you're so inclined.

I'm unable to run the integration tests - it hangs after launching the completion process. Any guidance?