Added main class and Grid methods