some major refactoring to separate stubbing into local, package, and github