Clean up menu code.