Merge the last of Peter's changes which failed to merge over (due to models.py file being split up).