bugfixes and better documentation output