Major rewrite of lightgrid

See the docs