Added silent option to fop - reason: complaints about headers already being sent
Some rearrangements and fixes