[441] Cleanup to make CLI more CLI-like and move json decoder

- Moves the JSONDecoder to its own file in json.py
- Changes the CLI to act more like the other commands, using first
  argument (list or generate) to determine what to do.