Improve support for headers and params. To be continued