MenuBox closing refactor