clean up and add new syntax checks