DRY on exit function, removes some prior laziness on help behavior, adds error handling when expecting JSON, but no such luck