Synthesis and formulation of polymers and coatings