Misc improvements and tests for categories. Add LoggingFilter to replace ad-hoc debug controller logging