Update for due dates and location-based contexts

Hi Brandon,
My variation of your script, just for consideration.
Thanks a lot for the brilliant idea.