Extract object path resolution into a class