Fixed lattice truncation, added imaginary parts to layer integrals, and added order parameter for planewave excitation.