factored-out-object-to-filter
flattened structure, made functional
extracted out the placeholder finding logic
ordered logic a bit else to show why nil is tested