more bugfixes and docs