refactord methods specific codebase into a model