Removed unused code and added TRAIT support (see bug #20307)