Refactoring github integration