Improved lazy loading and added some comments