Updated documentation, changed commit traversal to use a queue rather than recursion to avoid stack overflow with a long history.