some changes and fixes and documentation