Added helper functions, started the grid