clean up collision code