Category state pipeline

Adds a pipeline for category states.

Unfortunately this pull request contains some styling and other stuff to, but it's to intertwined to extract.