Replaced 9 with a django-esque ORM based solution.