major changes, most of heavy-lifting is now in helper.js, and heavily commented
Merge branch 'master' of https://github.com/ekdevdes/cpr