clean-up
Make number of layers configurable
it works again
bugfixes