Added query string to routes.

Added handling for query string.