Preload parent folders.
Clean up and centralize preloading code.