Refactored InputFilter, extract local Inputs.
Reviewed and refactored manipulation of collections.