Refactored notes to note object in firebase