Made an enormous hackey mess of things

Had a long day of trying to "improve" to command line processor but I think I just made an absolute mess.
Will probably revert.