Bugid 97734

Fixes numerous minor issues with CategorySelect. See commit messages for more information.

Please, don't merge this yet. Just want to get eyes on it.