bugfixes and updated documentation