Make small changes in the Nim and Grid class