Add caching. Fixed XML encoding to be UTF-8 always.