add command-line opts, add --raw functionality for shell, folds, clean a little