Add state qualifier table

    This refactors the existing rule code and reuses it for state-quals.
    - Not hooked up to display yet