Materials and process optimization in the reliable fabrication of polymer photonic devices