Added control to create cloudtm stuff only on the primary gear
Working on ruby error, added master hooks