Move urlfor() shell function into a script to reduce shell memory;
Remove hostname from output.