Updated thunkify and removed nedb dependency