Reorganization and better build script