Refactored note model to include reference to parent group