[Template] Simplify templates, moving logic to models
Call main when used as a module
[main] Create output directory and show usage