Implemented changes based on the code review