Moved factory things into a factory package