Enforeced code rules

* Started to use the codeing rules
* Fixed a bug where updateObserverItem was called instead of
  unlinkObserverItem