Renamed 'CharTraits' to 'traits'.
Applied some more changes recommended by Daniel Kruegler.