add filter parameter to index routes
fix query string parsing bug
misc cleanups and fixes
test fixes
remove debug messages