Refactored deprecated warning and result