Some URL cleaning
Minor template work