Added first iteration of code that resolves sub objects