Updated with the code review comments