Added Models registry and global set_db