Implementing new :commit_count
Minor refactorings