PEP8 cleanup, removed deprecation warnings for use in Django 1.5