Electro-optical and optoelectronic devices