new current_switching example and minor cleanup