various small modifications and corrections