Added an update function to clear caches, accommodating moved files and new hooks.