Added query string parsing