js syntax cleanup