Refactor attribution pass