Put back in side collision detecting, refactored code