Clarify license terms
Clarify variable scope and obey jslint prefs.