AdvancedEnhancer: remove unused code, cleanup