Bugfix, doc changes, code clean up

Move constant data to top of file. Nuke remaining commitLink references.
Make get_branches private. Update various comments and docs