Implemented add and update methods of Firebase factories