Moved detection of max number of commits to display into refresh routine, to allow dynamic adoption and self healing.