Core/Grids: Replace some magic numbers with constants

(P.S.: That's why! @cs_misc.cpp)