PR changes. url_for introduced extensively. Common parts moved to main template.