Organize factories
Merge pull request #125 from tuxedio/c-refactor-factories

Organize factories