Minor bugs and added support for observer.