Added stuff for throwing parse errors instead of silently failing.