Tidy up scheme url generation