More updates to handle working with more then one database