Added functions to create db, fixed ns