Initial commit.

This is a first try to approach the problem.
It doesn't work yet, not tested fully, just a base
to further development.