made minimalistic changes to add AngularFire, both single values and arrays