Improve error messages
Add some escape characters
Fix function name
Small simplification
Allow (when appropiate) unescaped special characters inside character classes.