Fixed a few syntax and other minor errors