Materials and processing of polymer-based electrochromic devices