Improved command handling flow

* Preprocess the list of commands entered by user
* Added stop method to Interpreter
* Called Interpreter.stop() before Interpreter.run() when clicking run-btn