This comes from Abdelali Mohamed Lamine (mabdelali1 on BitBucket), plus some requested changes from the reviewers on top of it.
Also, a quick note: this passes the push suite. :-)
@gbryan @dcollins4096 @yipihey @jwise77 - could you guys please take a look at this PR and hit "approve" if you're OK with it? This fixes the declined PR from @mabdelali1 to include the changes suggested by Greg Bryan.