Prepped for dependency only values in cache.
reworked to_tree, triggers and triggered_by for new caching.
Fixed up dependencies.