Refactored to use Cell objects.