Bug fix.
Change of terminology, and improved class inheritance.
Major overhaul, partly as a result of terminology change.