Moved gui code to guitool