Fixed error and began to add grid creation to lua.