Simplified mdmwebkit
Simplified futher the code in mdmwebkit.c