Can now pass mode argument to switchMode()

Allows you to set a mode to use via the API