refactor: move firebase stuff out of controllers and into service