documentation, some tweaks and cleaning