doc and bugfixes