Added update button function and fixed visualization problems with pushed buttons