Added code to deal with syntax checking.