Category support

Here's something that might work. Comes with test cases.

I tested it with the project I'm working on and it's nice. Maybe some of the template tags are a bit superfluous
and if you don't like the mixin stuff I ended up mostly not using we can get rid of that.

RSVP :)

Goes out to issue #79