Now retrieves sub-entities. Now closing connections