Make instances behave as factories.
Merge branch 'master' of https://github.com/foam-framework/foam