fixes and more documentation