Factorized version of the output module
Merge branch 'factorization' of github.com:garrelt/C2-Ray3Dm into factorization