Fix Issue #11

Problem: isDirty and reset functions where added to the model. Fixed it
by moving the self-assignemnt 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.