Merging some changes from testscript into findepochs