Bugfixes and updated output.