Moved repeat helper functions to it's own class.