I think the factory service function are easier to start with #3
Merge branch 'refactor'