This code is used as a client-side controller for filter select controls.
If you have an issue with using it I'll rewrite the thing. For me it's just much more simpler an cleaner way to implement this logic.