Made functions.py less dumb.