Added map grid optimization