Change commons permission from list to set.

Order isn't relevant.
Implement object class and commons queries.
Misc PEP 8 fixes.
Clarify set/regex options in relevant queries.

Set logic is used except in regex matching.