Clean up code
Refactor config change event