PHPUnit, library architecture.

Added PHPUnit configuration and basic tests. Changed architecture of the
library. Decompositions are now represented by own classes having a copy
of the original class.