Improved test support, fix auto-complete on repl