Improved error formatting and valid syntax directions.