Tests refactroed. Cache tree passing all.