better organisation of http lib