Changes to make compiling on Linux possible again; most unit tests still failing, and it segfaults on requests