Made changes as per code review feedback

#3015