Refactoring Labrador to not be specific to HTTP apps