Refactor models to a seperate package