Factorized code and added info if repo was modified