Add multiline support to REPL
Moved some functions to the helpers module