improved documentation
small code clean-ups
more code and doc clean-ups