Works, not fully tested, no documentation and line pos in exceptions