Syntax and other various fixes