Category Manager

This adds all the code for the category manager.