preliminary support for https; improved repl