Fix typo
make the second argument for get_leads_by_list optional
fix the flatten attributes to accept when there is a single attribute

was previously accepting only array of objects, now can be a single object