Improved Commits queries and CommitsPeriod.