the clearGrid call is not needed indeed, but the tileSize if else I definitely need to get things to work properly