Reconstructed entire plugin to use XML instead of JSON.