Fixes and extensions.

Removed also some not really useful stuff (like the 3x2-matrix).