Added syntax context, now passed around everywhere

It's a bit awful to have it everywhere, but maybe it was just awful to refactor all that code...

Feel free to cherry-pick the other two commits as well.