Add procedure parameter passing by ref
Improve test.sh (build, compile and execute in different steps)