Too complex; can some of this be a separate finder method and can the code be less defensive?