Modify as per suggestions from jslint