Switch-by-number: Abstract logic and add to hotfix