bugfixes, syntax/error message improvements, added REPL