Rewrote state impl as with Signal as tree