Revamp gating pulse logic.

Don't be fancy and filter in place but mark for removal and filter after looping.