Can someone help me update these code into 1.0.1.

You need to be more specific about what does not work. What was working that now does not work any more?