Refactored both notes and groups collection and saved to firebase