Rename dbname, add new functions