Refactor selection of active menu class