Fix for Issue #11

Problem: isDirty and reset functions where added to the model. Fixed it
by moving the assignment of "self" out of the result function. So the
this-Reference of the actual dirtyFlag-Object is saved in the variable
self and when the result function is called later, the isDirty and reset
functions are added to the dirtyFlag-Object and not to the viewmodel or the window.