Fix many bug on the dom generation after using a deprecated function.
Patched and works now correctly.

Left to do : Some interface stuff...