Add lazy loading to lib