Removed the -i flag from the base64 decode in unpack_data since not all versions of base64 support it.