Merge pull request #21 from rfaulkner/working

Fixes for WEP_AR to build cohort composites and other misc
mod. add docs / pep8.
fix. ref to "<table>" rather than "<database>" in unformatted query.