Cleaning up manage.py and adding logging