Massive cli refactor