Fixed "clear scores" dialog bug in IE.  Also moved code out of global namespace