Moved GridNode functonality to it's own class