A ton of changes to make the project work with django.