Simple observer pattern implementation