Comprehensive measurements of the flux flow oscillator (FFO) radiation linewidth are performed using an integrated harmonic SIS mixer; the FFO linewidth and spectral line profile are compared to a theory. An essential dependence of the FFO linewidth on frequency is found; a possible explanation is proposed. The results of the numerical solution of the perturbed sine-Gordon equation qualitatively confirm this assumption. To optimize the FFO design, the influence of the FFO parameters on the radiation linewidth is studied. A novel FFO design at a moderate current density has resulted in a free-running FFO linewidth of about 10 MHz in the flux flow regime up to 712 GHz, limited only by the gap frequency of Nb. This relatively narrow free-running linewidth (along with implementation of a wide-band phase locking loop system) allows continuous phase locking of the FFO in the wide frequency range of 500-710 GHz. These results are the basis for the development of a 550-650 GHz integrated receiver for the terahertz limb sounder (TELIS) intended for atmosphere study and scheduled to fly on a balloon in 2005. We report here also on the design of the second generation of the phase-locked superconducting integrated receiver chip for TELIS.