- remove unused code
- simplify check for XAs support. remove unused code