re #579: put all the States code for recurring/gateway selectors into one function... finally.