Commit before collision detecting refactoring to account for collision box