Refactor collision check to 100 line limit