igortyhon's reply is a bit harsh, but I agree - it makes no sense to use so many functions. It's impossible to understand what's going on in the code.
Use breakpoints and Debug Preview (Shift+F4) to debug your code. Although breakpoints sometimes don't work in functions.
Also I suggest using Browser Log action. For example:
Browser Log "CurrentTestNum=" & CurrentTestNum