Refactoring observer pattern example - for clarity and to improve ease of extension