various touchups, including fixing a bug resulting from forgetting to pass the request object to templates