Adjusted stop menu and further code cleanup