in reply to Re^2: How to start writing modules
in thread How to start writing modules

You could start by figuring out why they don't work.

Once you've gone through that, possibly even getting it to work, then you'll have enough experience to know where to start from scratch. And possibly, why.