Polymer waveguides and device applications