Update ajax to new ORM