Added lazy loading of resources. The resource was previously loaded on each render, but now it is loaded the first time it is used and stays in memory.