Refactored and restored after component change