Development and Application of a Design Flow for Photonic Integrated Circuits