Added an allocate entity data function

Added to factory components so we can allocate the entity data during
serialization and then populate it with the DOM.