Minor refinements, added support for basic grids