JS cleanup to comply with JSHint.