fix messed copy-paste, move template stuff into http part