Bounding box support for search

Also cleans up activity queries.

Fixes #249