Instead of painting each cell and calculating each cell's size, implement a "cell" class that does that