Changed links to buttons.
Some minor fixes in script.