Enhanced Build Script