Yes, the commented code is only for calling the API functions somewhere from outside. I marked that section as test code and I will delete it before merging.
I agree that it's a little bit redundant but after facing an error I found a subject and this approach was recommended and it worked for me. This happens since I need to convert array of bytes to float value and then to variant which GUI understands and during this conversion some values get more that expected values after decimal point.