Speed improvements

This PR introduces many speed improvements

* SQL query optimization 
* Generate URLs rather than instantiating objects and getting their URLs, which may fire off unneeded SQL queries.

I also discovered a problem with the SQL to generate a list of a given Day's events.  So I fixed that too.