Minor template fixes
More efficient URL generation