expanded on the entity manager a bit.