Working firebase. Should be final code