bring JS up to date with API updates

fix js bugs in modal.js

compile assets to fix bug

fix more bugs and precompile
merging with master
merging with master
merging with modal branch