Rewrite switch to use br when appropriate