refactors Discourse.Resolver

splits code into smaller, more focused methods