SMS: Nonparametric inference on manifolds