Added Tal's first code review fixes