Naming conventions applied throughout.
The naming conventions are described in docs/nameconventions.md.
This change is, unfortunately, very breaking and will affect almost all
users of the code. It does mean that function names are much more consistent
than previously.