Refactoring CLI to simplify and integrate with Spark model better

NOT READY FOR MERGE
I think the indents are changed here; can you run `scripts/format-sources` to clean those up?