Refactor collision resolution