Add syntax error msg, misc improvements