Refactor grid mesh.
Make usage of MeshHashGrid optional.