Uncommented Switch Event related code.