Fixed lots of errors leftover from example class

This version should in principle actually work -- I think all of the
function names are correct and the parameters are added to it in the
correct manner.