Cleanup
Fixed assert for pdf test.
Refactoring to common http provider.
Refactoring with lambdas