Remove unused javascript function