Move more general repository functions out of models/repo.go
* Changed migration calling so that migrations can use models package