Updated to reflect code review comments