Finished writing the first draft of setCell. It typechecks but is not tested.