Make context param optional in flatten.

- Addresses #42.