HTTP gateway implemented,
@TODO: Test error conditions
paste-new fix and some comments