A proxy pattern for handling data indices in firebase