Added xml recognition and a few subprograms