Move some code into hubway.py