Consting and passing by reference of internal function parameters.
More consting, mostly operators this time. Also removed references to the C++ interface, forgot to do that for last commit.
Improved error/exception handling.
Consted the API, minor tidying.