Initial implementation of MarginGrid