changed order of menu buttons, code cleanup