Fixed model code not updating the GUI
Split the gadget window into MVC structure