Add maintainer api

Refactor code and moved a bulk of code from listeners.pulls to adapters.git where it belongs. This allows more ways to use the same underlying unit without having to have all of the logic.