Simplify. Update resolve algorithm to pass spec-1.1 branch (as of writing).