Decode api update v1.0

If first patch is only an updated version of previous request (convert all Decode function and fix comments of previous PR), the second is addressing a newly detected issue.