Some corrections for the usage of the API...

Then a trivial one where all the trailing whitespace is removed.