fixed templating, added multifile to templates etc