rewrites code, moving all capture.js into accordion.js. Numerous bug fixes, due to better code architecture