Fix a bunch of search bugs, dating from when we switched the app to use the new Congress API. Closes #598.