Refactoring rules for 'projects' and 'sets'

Also modified the dummy variables in query.php to match the
pre_get_posts redirection.

See ticket #3.