Updated a few CLI files and Api.php