implementing more of the EntityManager and adding some basic tests