added a munchArgs function.  Small code fixes.