Updated switch function definition to be more in line with other functions. A single first argument that contains all components.