Revamped API and implemented UTF8 text stream.