added onclick to yes and no buttons

added onclick to yes and no buttons, added comments to some functions,
cleaned up code