Refactor repository model new methods for language statistics