Linux and Windows merge

Linux and Windows should now be working.
Not a pretty way to patch turbo - but I'll sort the ffi out later (not a
high priority).