Improve redability of multistate filter pre_process sub.