Refactor collision check module to 100 line limit