Refactored build script: OOP version (two classes)