Update testrun.sh

Major moves towards all functions