Feature/union toparam

Tidy version of union feature and add support for toParam to Join and From blocks, as well as a fixed mocha test setup.

/cc @richjharris