Start to modularize NtupleWriter
Small fixes to ensure compilation