Refactored parts of the observer example.

Inversed roles of abstract class and interface for observers.