Created the generator functions + tests.

Switched to Mocha/Chai because of the nice BDD flavor.
Fixes #6.