got rid of global var. added buttons to questions/chain.html

buttons: add, edit, delete, demo, generate file

delete, edit, and add are fully functioning.