Preparing for adding websocket streaming implementation: Restructured and moved HTTP-specific code into its own module