Refactored to use angularFire for explicit synchronisation