update basis.js
various fixes