Fix StringIO on Python 3
Add restart() to debug menu
Fix console window focusing