Improve clean url method