Fixed cleanurl and tests