Refactors TrialObjects to be compatible with Blockly.
Adds basic block generation for trialobjects.