Add a function to add easily new widget to the window.
Remove some useless and buggy instruction.
Modify the createWidget function. Modify the main program (no longer segfault).