Cleaning things up in application.py