First export features
Improve output dir structure and code