Move chrome extention calls out to a wrapper.
Add first tests for branches functions.