(I'm sure you know the thread should be marked as a question under discussions... rather than a blog post)
The last fault (at the end of the sheet) is that I.g is already defined as a scalar, so you can't do the final assignement because you can't index into I.g to set its u'th value.
Use another variable rather than I.g at that point.
It was hard to tell which questions where rhetorical, and which were specific questions for the collaborators (e.g. you have already done a spline, so the question asking about doing it is somewhat rehetorical)