Add early checks, some documentation and support UTF-8.