Firebase repository refactored out