Optimal design of 1D photonic bandgap devices by using the Leaky mode propagation method