Refactor the module