Rearranged update to accomodate new collision algorithm.