started to unit test the server, led to some duplication of code and a split of the server/api server starts to emerge
basically rewrote the whole thing