Re-implementing Firebase integration.