minor refactoring in KarteStyledDocument