Small refactorings related to collision.