fixed the javascript errors, buttons still not working