Code cleaning up for Db model