Interpreter now extends Thread instead of implementing Runnable so that it can be quit in the middle of executing a wait statement.