Use hierarchal categorical modules

This does not change behavior, it simply re-organizes things. This will make
adding other components to the API easier, and will allow us to begin using
blueprints.