Added some syntax checking.