properly implemented the cancel button and refactored various variable
names in the CategoryPanel