More cleanups of stuff I found annoying while debugging some issues.

We still have quite huge todo :)

1) finish the header creation to much the current perl cleaner
2) the {} is still somewheat fuzzy