Refactor Observer Pattern