Currently deleted databases are removed from the .json file whenever an object is selected (in function 'remove_deleted_databases'). Maybe this could be done as soon as a user deletes a database (or at least when the user switches to a new database).