Moved entity manager from EntityQueryDefinition to EntityQueryFactory. Brushed up EntityContainer constructor.