Fix handling of binary and ASCII strings
Move binary implementation to separate namespace (to avoid polluting the global namespace with non-core functions)