added memoization of accept-charset parsing and docstrings