Actually you can reduce the size of the private open event by using the && operators in the sequence of your if statements.
For the switch alias, though, you can do this:
alias pvtc { set %pvtc $+(o,$iif($pos($$1,on,1),n,ff)) }