Move subproblem naming to decomposition tree.
Add type checks.
Add copyright notice.
Add demo how to draw decomposition tree.