Code refactoring for github module