Refactoring of lazy loading functions.