Factored out common code in 'vectorgrid'.
Factored out common code in 'vectorgrid'.

daviddeng/azrael,olitheolix/azrael,olitheolix/azrael,daviddeng/azrael,daviddeng/azrael,olitheolix/azrael,olitheolix/azrael,olitheolix/azrael,daviddeng/azrael,daviddeng/azrael