Merge two bash scripts

I am currently running the following two bash scripts, in order to start x, matchbox and midori on the raspberry pi hdmi, using a remote ssh session.
start-browser

#!/bin/bash
# import variables
source /var/rpi/scripts/config/variables/general
echo "starting browser"
DISPLAY=:0.0 sudo xinit $config/play/play-browser -- -nocursor > /dev/null 2>&1 &

play-browser

#!/bin/bash
# start browser
xset -dpms
xset s off
xset s noblank
matchbox-window-manager &
midori -e Fullscreen -a $browserurl

I would like to merge these two scripts into one. I tried a few things but I keep getting errors from x.
How can I merge these two scripts?
Thanks

Put one script under the other using vi's r second_script
or cat script1 script2 >combined.

edit combined to eliminate the second

#!/bin/bash
# import variables

I did not see anywhere where $variables were being setup.

But the first one calls the second one. Its not as simple as copy/paste the one into the other.