Main menu shows up on F12 instead of process terminaton

Cleaned up some code