refactored build scripts further.