Some fixes I forgot about and a few updates to make the code compatible with Django 7.x.