Fixed various issues, mostly related to syntax.