Refactor resolve switch into Resolver hierarchy