New date handling; query for date ranges, etc.

Also modifies script for new deployment config.