update code
clear templates