Switch logic and rename update button and edit link