Moved button business to appgui.