Move functions from stationary.py to cycle.py stats.py and utils.py.