Optimization and Tolerance Analysis of Planar Waveguide Components