Added behavior to detect walls and stop moving.