Adds a "shell" task to launch an interactive repl; fixes some bugs