Added a class for the observer pattern

Simplifies making a subscription/subscriber relationship, and simplifies
letting one class have many different types of subscribers.