Refactor widget destroyer