Added cell collision handling.