move scripts into template folder & use macro for partial cache