Added lazy loading to database-requiring code.