Updated models to work with EntityManager and updated helper after bad merge.