Finished the new collision checking code