more documentation
doc and code cleanup