added several files and improved the way Qt could clean up the objects created