Lots of syntax fixes