Logic for name setting for queries, callbacks and workflows  moved to factories.