Added CyclicInsertRulesProc with maximum depth working