Revised CLI and api calls