I had a hard time figuring out all the steps relevant for this to work. Hopefully this brief summary and couple of links will help the next person writing their own script. See: #601