Fixed populateNames
Fixed additional code smell