fix things up according to code review comments