Improve Factory classes

This fixes some horrible template code as well as some restructuring
for improved readability
Fix DataCore documentation