Category functions

Allow a function to be passed to displayCategory.
Rebuilt.