REFACTOR: implemented flexible error handling, preparing for nicer handling
IMPL: nice syntax error reporting (part of gh-7 )