Tests

I want to add tests for the server and started by looking into the initial work done in the `tests` branch. I plan to give [Jest](http://facebook.github.io/jest/) a try too.

This PR is just a `rebase` with `development` and merged conflicts. The tests are pretty isolated and I think it would be nice to move them to `development`.