Various fixes for test cases and URL string builder.