some minor changes: comments, debug-output, ..