Add GetAllLeads function

Also add unit tests