Rewrote getting the container object to be quicker.