New method parse_location to convert query params to hash