Some small changes and fixes

- started code-cleanup
- fixed output for '--export', to make it readable by Bash again
- (therefore) introduced DEBUG