Fixed a lot of stupid little syntax errors

And I mean a LOT. Only 5/22 unit tests fail now. (Hangs indefinitely at
the end of testing but such is life.)