Added singleton.
Added observer pattern.
Some fixes for the observer.