Fixed the issues addressed by the code review