Refactoring to use spf13/cobra correctly