Some refactoring of how collisions are handled