Refactored Github API helper methods and started writing tests for it