Finally got encoded data to save. Have not implemented restore yet.

Have separated the data and encoded separately to get the save
to work, now need to reverse the process on decode, so that the
data can be used.