Db: Bug Fixes and minor improvements
Introducing the new Model class