Improved build.sh and service.sh