Refactor the factories (fixes #24)