This improves the structure of the code, separating the data/control interface out and then implementing the http interface as a user of this interface.