Refactored cli interface to be more sensible