display_template functions cleaned