Improve category processing in menu