[feature/widget] clean up code