Syntax and other fixes