Some fixes after first code review.