Move Optimizer code to SimpleTranslator
Fix a bug where keyboard remained locked when re-starting.