Script improved

improved the build scripts.