fixed exception string bug
removed phonebook_exists function and replaced with database.table_exists
add migrated to db
lookup migrated to database