Refactor a bit more

Only have one variable for the httpheaders.