Improved logging in sh/integrate.sh
Added all initial functionality to sh/integrate.sh