Clean up the factory code
Fix CS
Merge pull request #99 from blanchonvincent/feature/factory-code-cleanup

Clean up the factory code