Rewrote large parts of the application to use smart pointers rather than QObject parenthood, and fixed proper destructin sequence upon window close (opposed to immediate exit)