Build script refactorization.