Added a second implementation of schmidt functions, cribbing from a different source, but it didn't change anything.