Improved error handling.  Changed parser