'refactored' code to use a javascript object as a middle step, and work recursively.
Merge branch 'repo_to_html_refactor' into merge_repo-to-html_refactor
Made changes to make unit tests work again
Merge pull request #49 from PolicyStat/merge_repo-to-html_refactor

Good to get this merged together.