Moved the cycle initialization in its own method.