Remove cycles