Made underlying Map immutable, contained map is changed for new copy on modification, also extracted a Grid[T] trait and hidden the implementation case class