Fixed line endings and shortened factor array due to unused factors.