Code review comments incorporated

Code review comments incorporated. New test cases added also