clean up error parser to implement simple grammar and consolidate error messages; clean up unused imports