Reorder functions and fuse cache_release/install_dependency