some documentation, small bug fixes