Some fixes by Roman's review.