Refactor all logic into a factory