Branch/collision detection

@eric79 Let us commence review!