Move init function from script to example file
Add pointer parameters and many others.