Further refactor resolve and add test coverage

Refactor resolve method a bit more, removing the duplication in rescuing ArgumentError twice in a now.