HttpConnection and widgets refactor