added prettier error messages, refactored parse/compile