gui conponents and functions for displaying and saving templates