Cleanup: Various fixes.

- Reverted recent CA1822 changes.
- Bundle xml needs to be trimmer before loading.