Added run() method

If the console interface is going to be used, we'll use the run() method for input/output.