Deleted frequency of cycle detection
Users can no longer define every how many actions are between each cycle
detection. It is now executed after every action.
Simplified the cycle detection algorithm.