Added support for intent. And minor xml changes.