some small bugfixes and cleaned up the documentation