applied optimizations to ASCII; refactored unsafe portions of UTF-8 impls.