Code dedoublication in models/models.go

Just some code dedoublication in models/models.go
Merge pull request #444 from tstorch/database-cleanup

Code dedoublication in models/models.go