Bugfixes and better documentation.