Rename and added tracing for "switch".