Added some grate cloning code