Bring back some LGE changes and ifdef code