added documentation; tiny fixes