Make it build

I still have no idea whether this will work, but at least it now compiles