Code cleanup to pass jshint