Added models.py, cleaned up teximage