Added command line options so it is possible to paste in a non-interactive way. Good for calling from other scripts.