Refactoring CLI commands returning lists

Change-Id: I52726d8baa471b6d365b542a117b1fd908541e4c
Merge "Refactoring CLI commands returning lists"