Added test cases for the getCells() method, and fixed a minor bug in getCells().