Improved deployment script (with branch)