I offer you this code, freely, with the understanding that I take no responsibility if anything breaks as a result of the use or misuse of it.

Group efforts also available here:

Enjoy!