Made the buttons work using external javascript