Extracted the text cycling functions into their own file