Lots of cleanup work in the xenlight backend