decode multiple args and minor tweaks
renamed to more general
implemented --decode option