Large refactor of HTTP and Console stack.