Revert "Use a global object manager instead of passing objects"

This reverts commit 1bc3d89664ca86a16e40a14748537bc125e3ebb4.