The first cut at the complete script...