Updates based on code review (to be squashed later).