Updated following code review