Sync with Fritz

Sorry for the monster pull request ... will use branches now.
that somehow looks like rather system dependent programming ... please explain