Refactoring work and initial work on make_tlm, reduce_arc and reduce_sky. Added a small template for reduce_fflat.