WIP. Abstract the EntityManager