Added subscribe to object update

Added code to subscribe to updates of the context object.
Also resolved some JSLint warnings.
Merge pull request #1 from mgroeneweg/master

Added subscribe to object update