adding API caching and better unicode support