Preparation, characterization and properties of sputtered electrochromic and thermochromic devices