refactoring
split switch client from switch UI