Nice. Except that `$root.$state` declaration, this is almost re-usable across nutupane implementations.