Fixed thread synchronization of TTYs. Added Options menu to terminal UI.