Ordering categories to what API has
Simplifying category conversion at server side
MenuControl was hardly a control
Using more object oriented approach
Removing scoped global variables
Tiding up code