fixed export global var name
added defaults for template attribute