Feature/union toparam

Updated version of union and toParam as well as a fixed mocha test setup.