Much better grid initialization/calculation