added call back for ending bet state in ui.js, changed index.html javascript src order a bit so that it would work.