*Moved Javascript to static script file and added dynamically generated variables in template