Better consistency, complete functionality.

Accessor functions getInverse() and setInverse() now do something
useful and do not wreck the cache anymore.
Better comments. More tests.