License ftw!
Better comments in misc.js
Comments in generateBasals.js
More comments and fix consistency of Fn suffix in misc