Move grid logic into Map and remove Gridd

It's not really generic enough to be used as a separate plugin, so I'll
just butcher the code and utilize what I need for now.