Added methods to calculate cell properties.