Refactored events stuff

I needed to do this to internally manage firebase events, and prevent multiple firebase events from being triggered at once.
This is a good example of where the callback pattern with `err` would be helpful rather than expanding each function to accept nebulous input.