Make category options into key/value
Make category options into key/value

so that we can store the query string with the tab name, since it's not the same in every instance. fixes #666, and makes a couple other style tweaks.

LLK/scratch-www,LLK/scratch-www