updated documentation and some minor changes