Added some syntax checking