Improved lazy loading with resources management