Cleanup URL handling