move setup to top of template. change PROG to u_PROG. fix unset of option vars