Add cli helper and fix some routes