Photonic crystal cavities and waveguides