global variables
add image and script resources
Add templates.