Move resolution logic to shared file