Some JS refactoring

Removed most of the JS from the HTML.  Reworked the buildLeaderboard function to be way simpler to call.  Made it so the leaderboard updates when you change any property, regardless of whether you click update.