Fix threading issue in REPL

Unity methods now work
Improve REPL interface in Unity