Finish refactoring modules and factorys