Added formal source generators.

- Bugfixes.
- Added logging.
- Documentation update.