everything is very messy, but closer to working. the templates have hard coded paths, and the util function for calling element_gen is unclear