Embedded DanV's code into the createTrial page

Reviewer: Daniel V.