Added events system
Now calling back event wf.refresh on every calls on the function of the same name
Added form handling in modal