Added gates. Still buggy. Also added instaTorch.