- added debug output (disabled per default)
- some clean-up