Even more refactoring

Use split() and grep() combo in decode() instead of regex substitutions,
and let the hash/unhash helpers take arrayrefs.  Also make the 'split //
=>' usage a bit more consistent.