Remove tons of superfluous code and switch to using libraries instead of hardcoded XML strings.