Gui code almost complete.