Refactor the CLI to use JApplicationCli