Fixed placement of models classes so foreign keys could be generated properly by django.