bring JS up to date with API updates

fix js bugs in modal.js

compile assets to fix bug

fix more bugs and precompile