Improve distrib build
Fix and improve build system