moved out js code (used for making template files) from within caster.py to standalone
js files