restructure build scripts