Am happy to help out, as have worked various cgi based sms solutions before ..
sadly, my experience was that as quickly as I customised my code for any given free-sms-provider,
they changed the forms / security model, and I had to start all over again.
I suspect you'll bang against the same problem when trying to create a generic module.