Function to create an observable pattern for state management
Observable object with subscribe and notify methods
Function to create an observable pattern for state management