Added XML literal support, fixed various bugs