GLUS: Added fourier function plus made random generator more robust.