some fixes

I still couldnt quite get it to work (using jquery and jquery ui). But this should make it a little bit cleaner.
And the test pass now again.

I also added more tests and removed the exit part in favor of a clean response part.

Note that

    $elementId = 'eip_' . String::uuid();

is required since uuids can start with numeric values - and IDs in HTML are not allowed to do that.