Largely rewritten documentation, using splines demo API.