Refactor and optimisation of STKHTTPDataSource and STKAutoRecoveringHTTPDataSource