Loosened the generic type S since the extensions do not need to know
what S is.