Creates grid structure