Changes to take into account code review remarks.