adjusting module system
update to use modules, JSLint fixes
using more AMD-like module system