Synthesis and characterization of functional polymeric materials for use in organic photovoltaics