Move out connection logic to Grid