Revert "Fixed a patch (strange) with some missing #endif and updated def config"

This reverts commit dc97f6ff613ccf476ae32aae30382cc0c61186ce.