fix deploy/build.sh bug
cleanup code